import axios from 'axios';

const httpRequest = axios.create({
  baseURL: '/api',
  timeout: 5000,
});

httpRequest.interceptors.response.use(
  function (response) {
    return response.data;
  },
  function (error) {
    // 对响应错误做点什么
    return Promise.reject(error);
  }
);

export default httpRequest;
